package com.pearadmin.pro.modules.professor.service.impl;

import java.util.List;
import java.util.ArrayList;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pearadmin.pro.common.web.base.page.PageResponse;
import com.pearadmin.pro.common.web.base.page.Pageable;

import com.pearadmin.pro.modules.professor.domain.ProfessorEmploymentBackgroud;
import com.pearadmin.pro.modules.professor.param.ProfessorEmploymentBackgroudRequest;
import com.pearadmin.pro.modules.professor.repository.ProfessorEmploymentBackgroudRepository;
import com.pearadmin.pro.modules.professor.service.ProfessorEmploymentBackgroudService;
import com.pearadmin.pro.modules.school.domain.School;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;

/**
 * 教授雇员信息Service业务层处理
 *
 * @author ChenJian
 * @date 2021-08-29
 */
@Service
public class ProfessorEmploymentBackgroudServiceImpl extends ServiceImpl<ProfessorEmploymentBackgroudRepository, ProfessorEmploymentBackgroud> implements ProfessorEmploymentBackgroudService
{
    @Resource
    private ProfessorEmploymentBackgroudRepository professorEmploymentBackgroudRepository;

    /**
     * 查询教授雇员信息
     * @param request
     * @return 教授雇员信息 分页集合
     * */
    @Override
    public PageResponse<ProfessorEmploymentBackgroud> page(ProfessorEmploymentBackgroudRequest request)
    {
        LambdaQueryWrapper<ProfessorEmploymentBackgroud> query = new LambdaQueryWrapper<ProfessorEmploymentBackgroud>();
        return Pageable.of(request,(()->  professorEmploymentBackgroudRepository.selectList(query)));
    }

    /**
     * 查询教授雇员信息
     *
     * @param id 教授雇员信息ID
     * @return 教授雇员信息
     */
    @Override
    public ProfessorEmploymentBackgroud selectProfessorEmploymentBackgroudById(Long id)
    {
        return professorEmploymentBackgroudRepository.selectById(id);
    }

}
